package com.ruoyi.order_address.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order_address.mapper.OrderAddressMapper;
import com.ruoyi.order_address.domain.OrderAddress;
import com.ruoyi.order_address.service.IOrderAddressService;

/**
 * 订单地址快照Service业务层处理
 * 
 * @author 张富饶
 * @date 2025-05-20
 */
@Service
public class OrderAddressServiceImpl implements IOrderAddressService 
{
    @Autowired
    private OrderAddressMapper orderAddressMapper;

    /**
     * 查询订单地址快照
     * 
     * @param orderId 订单地址快照主键
     * @return 订单地址快照
     */
    @Override
    public OrderAddress selectOrderAddressByOrderId(Long orderId)
    {
        return orderAddressMapper.selectOrderAddressByOrderId(orderId);
    }

    /**
     * 查询订单地址快照列表
     * 
     * @param orderAddress 订单地址快照
     * @return 订单地址快照
     */
    @Override
    public List<OrderAddress> selectOrderAddressList(OrderAddress orderAddress)
    {
        return orderAddressMapper.selectOrderAddressList(orderAddress);
    }

    /**
     * 新增订单地址快照
     * 
     * @param orderAddress 订单地址快照
     * @return 结果
     */
    @Override
    public int insertOrderAddress(OrderAddress orderAddress)
    {
        return orderAddressMapper.insertOrderAddress(orderAddress);
    }

    /**
     * 修改订单地址快照
     * 
     * @param orderAddress 订单地址快照
     * @return 结果
     */
    @Override
    public int updateOrderAddress(OrderAddress orderAddress)
    {
        return orderAddressMapper.updateOrderAddress(orderAddress);
    }

    /**
     * 批量删除订单地址快照
     * 
     * @param orderIds 需要删除的订单地址快照主键
     * @return 结果
     */
    @Override
    public int deleteOrderAddressByOrderIds(Long[] orderIds)
    {
        return orderAddressMapper.deleteOrderAddressByOrderIds(orderIds);
    }

    /**
     * 删除订单地址快照信息
     * 
     * @param orderId 订单地址快照主键
     * @return 结果
     */
    @Override
    public int deleteOrderAddressByOrderId(Long orderId)
    {
        return orderAddressMapper.deleteOrderAddressByOrderId(orderId);
    }
}
